{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.假复制 用= 进行赋值\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "names = [\"mike\",\"mary\",\"jan\",\"jack\"]\n",
    "names_源文件 = names\n",
    "names.append(\"abaaba\")\n",
    "print(\"names=\",names)\n",
    "print(\"names_源文件\",names_源文件)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "names= ['mike', 'mary', 'jan', 'jack', 'abaaba']\n",
      "names_源文件 ['mike', 'mary', 'jan', 'jack']\n"
     ]
    }
   ],
   "source": [
    "names = [\"mike\",\"mary\",\"jan\",\"jack\"]\n",
    "names_源文件 = names.copy()\n",
    "names.append(\"abaaba\")\n",
    "print(\"names=\",names)\n",
    "print(\"names_源文件\",names_源文件)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3.切片[:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "names= ['mike', 'mary', 'jan', 'jack', 'abaaba']\n",
      "names_源文件 ['mike', 'mary', 'jan', 'jack']\n"
     ]
    }
   ],
   "source": [
    "names = [\"mike\",\"mary\",\"jan\",\"jack\"]\n",
    "names_源文件 = names[:]\n",
    "names.append(\"abaaba\")\n",
    "print(\"names=\",names)\n",
    "print(\"names_源文件\",names_源文件)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
